 package gov.sat.tax.fwsk.wlrz;
 
 public class JmjBean
 {
   private String jmjIP;
   private int MaxThreads;
   private int Threads;
   private int indexPos;
   private boolean JmServer;
   
   public JmjBean(String jmjIP, int MaxThreads, int indexPos, boolean isServer)
   {
     this.jmjIP = jmjIP;
     this.MaxThreads = MaxThreads;
     this.indexPos = indexPos;
     this.Threads = 0;
     this.JmServer = isServer;
   }
   
   public boolean isAvailable()
   {
     return this.Threads < this.MaxThreads;
   }
   
   public void addWork()
   {
     this.Threads += 1;
   }
   
   public void removeWork()
   {
     this.Threads -= 1;
   }
   
   public String getJmjIP()
   {
     return this.jmjIP;
   }
   
   public int getIndexPos()
   {
     return this.indexPos;
   }
   
   public boolean isServer()
   {
     return this.JmServer;
   }
   
   public int getThreads()
   {
     return this.Threads;
   }
 }
